//ybzuo
//2010.03
//UI compote txt  file loader
#pragma  once
#include "i_UIcompote_maker.h"
#include <map>
class txt_loader :public  i_UIcompote_maker
{
	public:
		static txt_loader& single();
		txt_loader* get_ptr();
		bool make();
		i_UIcompote* get_current_compote();
		std::string get_current_name();
		void add_index();
		~txt_loader();
	private:
		void compote_load(i_UIcompote* _compote,std::string _name);
		txt_loader();
		std::string m_compotes_file;
		std::string m_page_name;
		int m_size;
		typedef std::map<std::string,i_UIcompote*> CompoteColl;
		typedef std::map<std::string,i_UIcompote*>::iterator CompoteCollIt;
		CompoteColl m_compote_coll;
		CompoteCollIt m_current_it;
	


};